package com.ck.core;

import javax.servlet.http.HttpServletRequest;

import com.ck.constant.RequestConstant;
import com.ck.model.common.User;
import com.ck.util.HttpUtils;


public class BaseController {
	
	public User getSessionUser(HttpServletRequest request) {
		User loginUser = (User) request.getSession().getAttribute(RequestConstant.SESSION_KEY_USER);
		return loginUser;
	}
	
	public String getOperationIp( HttpServletRequest request ) {
		return HttpUtils.getRemortIP(request);
	}
	
}
